<template>
  <div class="admin-profile-container">
    <span v-for="color in colors" :key="color" :class="['layui-badge-dot', `bg-${color}`]"></span>
    <h2 class="admin-profile-title">个人信息</h2>
    <el-card class="admin-profile-card" shadow="always">
      <h2 class="title">信息</h2>
      <div class="admin-profile-header">
        <img src="../images/head.jpg" alt="头像" class="admin-avatar"/>
      </div>
      <el-descriptions  class="admin-profile-info" :column="1" border>
        <el-descriptions-item label="编号">{{ userInfo.no }}</el-descriptions-item>
        <el-descriptions-item label="编号">{{ userInfo.adminId }}</el-descriptions-item>
        <el-descriptions-item label="登录账号">{{ userInfo.adminNo }}</el-descriptions-item>
        <el-descriptions-item label="注册时间">{{ userInfo.registerTime }}</el-descriptions-item>
        <el-descriptions-item label="状态">
          <el-tag :color="userInfo.status === '正常' ? 'success' : 'danger'">{{ userInfo.status }}</el-tag>
        </el-descriptions-item>
      </el-descriptions>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "AdminProfile",
  data() {
    return {
      userInfo: {
        no: "123456",
        adminId: "123456",
        adminNo: "2020123456",
        registerTime: "2024-12-18 08:36:49",
        status: "正常",
      },
      colors: ['red','orange', 'green', 'cyan', 'blue', 'gray'],
    };
  },
};
</script>

<style scoped>
:root {
  --primary-color: #67C23A;
  --secondary-color: #E6A23C;
  --text-color: #303133;
  --background-color: #FAFAFA;
  --border-color: #E4E7ED;
}

.admin-profile-container {
  width: 100%;
  padding: 20px;
  background-color: var(--background-color);
  color: var(--text-color);
}

.admin-profile-card {
  background-color: #fff;
  border: 1px solid var(--border-color);
  margin: 20px auto;
  max-width: 1000px;
  padding: 20px;
}

.admin-profile-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.admin-avatar {
  width: 100px;
  height: 100px;
  margin-right: 10px;
  border: 2px solid var(--primary-color);
}

.admin-profile-title {
  font-size: 1.2em;
  color: var(--primary-color);
  margin-left: 50px;
  margin-top: 20px;
}

.admin-profile-info {
  margin-top: 20px;
}

.layui-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: pink;
  margin: 2px;
  transition: transform 0.3s ease;
}

.layui-badge-dot:hover {
  transform: scale(1.2);
}

.bg-red{
  background-color: red;
}


.bg-orange {
  background-color: #FFB900;
}

.bg-green {
  background-color: #009688;
}

.bg-cyan {
  background-color: #03A9F4;
}

.bg-blue {
  background-color: #2196F3;
}

.bg-gray {
  background-color: #9E9E9E;
}

@media (max-width: 768px) {
  .admin-profile-container {
    padding: 16px;
  }

  .admin-avatar {
    width: 80px;
    height: 80px;
  }
}

.title {
  margin-top: 0px;
  margin-bottom: 26px;
}
</style>